#ifndef __WIZ_BNF_PARSER_INTEGER_HPP__SHANHAOBO_19800429__
#define __WIZ_BNF_PARSER_INTEGER_HPP__SHANHAOBO_19800429__

#include "./WizBNFParserSign.hpp"
#include "./WizBNFParserIntegerImpl.hpp"

namespace Wiz
{
    namespace BNF
    {
        namespace Parser
        {
            namespace Integer
            {
                namespace Signal
                {
                    template <typename ElementT, int Radix, unsigned MinDigits, int MaxDigits>
                    struct Type : public ::Wiz::BNF::Parser::Type<Type<ElementT, Radix, MinDigits, MaxDigits>>
                    {
                        typedef Type            tThis;
                        typedef ElementT        tElement;

                        template <typename ScannerT>
                        struct Result
                        {
                            typedef typename ::Wiz::BNF::Match::Result<
                                ScannerT,
                                tElement
                            >::tType tType;
                        };

                        template <typename ScannerT>
                        typename ::Wiz::BNF::Parser::Result<tThis, ScannerT>::tType
                            ParseImpl(ScannerT const& Scan) const
                        {
                            typedef ::Wiz::BNF::Parser::Impl::Integer::Signal::Type<tElement, Radix, MinDigits, MaxDigits>  tImpl;
                            typedef ::Wiz::BNF::Parser::Result<tImpl, ScannerT>::tType                                      tResult;

                            return ::Wiz::BNF::Parser::Impl::ContiguousParserParse<tResult>(tImpl(), Scan, Scan);
                        }
                    }; /// end of struct Type
                } /// end of namespace Signal

                namespace Unsignal
                {
                    template <typename ElementT, int Radix, unsigned MinDigits, int MaxDigits>
                    struct Type : public ::Wiz::BNF::Parser::Type<Type<ElementT, Radix, MinDigits, MaxDigits>>
                    {
                        typedef Type            tThis;
                        typedef ElementT        tElement;

                        template <typename ScannerT>
                        struct Result
                        {
                            typedef typename ::Wiz::BNF::Match::Result<
                                ScannerT,
                                tElement
                            >::tType tType;
                        };

                        template <typename ScannerT>
                        typename ::Wiz::BNF::Parser::Result<tThis, ScannerT>::tType
                        ParseImpl(ScannerT const& Scan) const
                        {
                            typedef ::Wiz::BNF::Parser::Impl::Integer::Unsignal::Type<tElement, Radix, MinDigits, MaxDigits>    tImpl;
                            typedef ::Wiz::BNF::Parser::Result<tImpl, ScannerT>::tType                                          tResult;

                            return ::Wiz::BNF::Parser::Impl::ContiguousParserParse<tResult>(tImpl(), Scan, Scan);
                        }
                    }; /// end of struct Type
                } /// end of namespace Unsignal
            } /// end of namespace Integer
        } /// end of namespace Parser
    } /// end of namespace BNF
} /// end of namespace Wiz

#endif /*__WIZ_BNF_PARSER_INTEGER_HPP__SHANHAOBO_19800429__*/
